package com.xja.service.impI;

import com.xja.entity.Users;
import com.xja.mapper.UsersMapper;
import com.xja.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userService")//这边写注解interface都不用配置
public class UsersServiceImpI implements UsersService {
    @Autowired
    private UsersMapper usersMapper;
    public Users username(String name) {
        return usersMapper.username(name);
    }

    public boolean reg(Users r) {
        return usersMapper.insert(r)>0;
    }
}
